package DB.dao;

import DB.dto.*;
import DB.exceptions.*;

public interface DrugsDao
{
	/** 
	 * Inserts a new row in the DRUGS table.
	 */
	public int insert(DrugsDto dto) throws DrugsDaoException;

	/** 
	 * Updates a single row in the DRUGS table.
	 */
	public void update(int pk, DrugsDto dto) throws DrugsDaoException;

	/** 
	 * Deletes a single row in the DRUGS table.
	 */
	public void delete(int pk) throws DrugsDaoException;

	/** 
	 * Returns all rows from the DRUGS table that match the criteria 'ID_DRUG = :idDrug'.
	 */
	public DrugsDto findByPrimaryKey(int idDrug) throws DrugsDaoException;

	/** 
	 * Returns all rows from the DRUGS table that match the criteria ''.
	 */
	public DrugsDto[] findAll() throws DrugsDaoException;

	/** 
	 * Returns all rows from the DRUGS table that match the criteria 'ID_DRUG = :idDrug'.
	 */
	public DrugsDto[] findWhereIdDrugEquals(int idDrug) throws DrugsDaoException;

	/** 
	 * Returns all rows from the DRUGS table that match the criteria 'NAME = :name'.
	 */
	public DrugsDto[] findWhereNameEquals(String name) throws DrugsDaoException;

	/** 
	 * Sets the value of maxRows
	 */
	public void setMaxRows(int maxRows);

	/** 
	 * Gets the value of maxRows
	 */
	public int getMaxRows();

	/** 
	 * Returns all rows from the DRUGS table that match the specified arbitrary SQL statement
	 */
	public DrugsDto[] findByDynamicSelect(String sql, Object[] sqlParams) throws DrugsDaoException;

	/** 
	 * Returns all rows from the DRUGS table that match the specified arbitrary SQL statement
	 */
	public DrugsDto[] findByDynamicWhere(String sql, Object[] sqlParams) throws DrugsDaoException;

}
